package com.itheima.run;

import com.itheima.domain.Student;
import com.itheima.domain.Teacher;

import java.util.ArrayList;
import java.util.Scanner;

public class MainAPP {

    //先写第一菜单栏
    public static void main(String[] args) {
        ArrayList<Student> list = new ArrayList<>();
        ArrayList<Teacher> list1 = new ArrayList<>();
        while (true) {
            System.out.println("***************************************");
            System.out.println("1.学生管理系统  2.教师管理系统  3.退出");
            System.out.println("***************************************");
            //创建一个键盘录入对象;
            Scanner  sc  = new Scanner(System.in);
            System.out.println("请输入菜单编号:");
            int i = sc.nextInt();
            switch(i){
                case 1:
                    StudentManager.studentmanager(list);
                    break;
                case 2:
                    TeacherManager.teacherManager(list1);
                    break;
                case 3:
                    System.exit(0);
                default:
                    System.out.println("你输入的编号有误,请重新输入!");
            }
        }
        }
        //编写菜单栏;

    }

